package com.ruoyi.project.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.project.domain.YhInstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mapper.YhAssistMapper;
import com.ruoyi.project.domain.YhAssist;
import com.ruoyi.project.service.IYhAssistService;

/**
 * 领用-协助信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-04-10
 */
@Service
public class YhAssistServiceImpl implements IYhAssistService 
{
    @Autowired
    private YhAssistMapper yhAssistMapper;

    /**
     * 查询领用-协助信息
     * 
     * @param id 领用-协助信息主键
     * @return 领用-协助信息
     */
    @Override
    public YhAssist selectYhAssistById(Long id)
    {
        return yhAssistMapper.selectYhAssistById(id);
    }

    /**
     * 查询指导教师存放表
     *
     * @param note1 指导教师存放表主键
     * @return 指导教师存放表
     */
    @Override
    public YhAssist selectYhAssistByRecId(String note1)
    {
        return yhAssistMapper.selectYhAssistByRecId(note1);
    }


    /**
     * 查询领用-协助信息列表
     * 
     * @param yhAssist 领用-协助信息
     * @return 领用-协助信息
     */
    @Override
    public List<YhAssist> selectYhAssistList(YhAssist yhAssist)
    {
        return yhAssistMapper.selectYhAssistList(yhAssist);
    }

    /**
     * 新增领用-协助信息
     * 
     * @param yhAssist 领用-协助信息
     * @return 结果
     */
    @Override
    public int insertYhAssist(YhAssist yhAssist)
    {
        yhAssist.setCreateTime(DateUtils.getNowDate());
        return yhAssistMapper.insertYhAssist(yhAssist);
    }

    /**
     * 修改领用-协助信息
     * 
     * @param yhAssist 领用-协助信息
     * @return 结果
     */
    @Override
    public int updateYhAssist(YhAssist yhAssist)
    {
        yhAssist.setUpdateTime(DateUtils.getNowDate());
        return yhAssistMapper.updateYhAssist(yhAssist);
    }

    /**
     * 批量删除领用-协助信息
     * 
     * @param ids 需要删除的领用-协助信息主键
     * @return 结果
     */
    @Override
    public int deleteYhAssistByIds(Long[] ids)
    {
        return yhAssistMapper.deleteYhAssistByIds(ids);
    }

    /**
     * 删除领用-协助信息信息
     * 
     * @param id 领用-协助信息主键
     * @return 结果
     */
    @Override
    public int deleteYhAssistById(Long id)
    {
        return yhAssistMapper.deleteYhAssistById(id);
    }

    //@Override
    //public YhAssist selectYhAssistByRecId(String receiverId){
    //    return yhAssistMapper.selectYhAssistByRecId(receiverId);
    //}
}
